proc() {
    echo -e "\033[42;32m > $@ \033[0m" >&2
    local command=("$@")
    if "${command[@]}"; then
        echo -e "\033[42;32m SUCCEED \033[0m \n" >&2
    else
        echo -e "\033[41;32m FAILED \033[0m \n" >&2
        exit 1
    fi
}

rm nohup.out
pkill PerMonMst &
sleep 1s
proc nohup python3 ./PerMonMst/PerMonMst.py &
proc echo "done"